package com.chandra.pos.employee.repository;

import com.chandra.pos.employee.dao.entity.Employee;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created with IntelliJ IDEA.
 * Customer: T4671
 * Date: 10/1/13
 * Time: 4:34 PM
 * To change this template use File | Settings | File Templates.
 *
 * http://spring.io/blog/2011/02/10/getting-started-with-spring-data-jpa/
 */

@Transactional(readOnly = true)
public interface EmployeeRepository extends JpaRepository<Employee, Long> ,EmployeeRepositoryCustom {

    public Employee findByUserName(String lastName);

    public Employee findByFirstNameAndLastNameAndCity(@Param("firstName") String firstName, @Param("lastName") String lastName, @Param("city") String city);
}
